package com.gitee.melin.bee.core.jdbc.enums;

import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.gitee.melin.bee.core.enums.BaseStringEnum;
import com.gitee.melin.bee.core.enums.jackson.JacksonEnumStringSerializer;

@JsonSerialize(using = JacksonEnumStringSerializer.class)
public enum FileFormat implements BaseStringEnum {
    ORC("orc"),
    PARQUET("parquet"),
    HUDI("hudi"),
    PAIMON("paimon"),
    DELTA("delta"),
    ICEBERG("iceberg"),
    TEXT("text"),
    CSV("csv"),
    AVRO("avro"),
    UNKNOW("unknow");

    private String name;

    private FileFormat(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @JsonValue
    @Override
    public String getValue() {
        return name;
    }

    @Override
    public String toString() {
        return name;
    }
}
